package org.example.design.designmode.facadepattern;

public class CourseFacafde {
    private  PayService payService = new PayService();
    private  OrderService orderService = new OrderService();
    private  DiningKitchenService diningKitchenService = new DiningKitchenService();


    public  void buy(Course c){
        if(c!=null){
           boolean flag= payService.pay(c);
           if (flag){
               orderService.order();
               diningKitchenService.dining();
           }

        }
    }
}
